﻿using System;

namespace Cooksta_Data
{
	public sealed class InventoryItem
	{
		private int _itemID;
		private string _description;
		private double _cost;
		private double _price;
        private int _groupID;
        private bool _isActive;
        private string _pictureLocation;
        
        //These three fields are based upon information on the transaction table
        private int _quantity;
        private double _inventoryCost;
        private double _revenueAmount;

		public int ItemID
        {
            get
            {
                return this._itemID;
            } 
            set
            {
                this._itemID = value;
            }
        }
		public string Description
        {
            get
            {
                return this._description;
            } 
            set
            {
                this._description = value;
            }
        }
		public double Cost
        {
            get
            {
                return this._cost;
            } 
            set
            {
                this._cost = value;
            }
        }
		public double Price
        {
            get
            {
                return this._price;
            } 
            set
            {
                this._price = value;
            }
        }
        public int GroupID { get { return this._groupID; } set { this._groupID = value; } }
        public bool IsActive { get { return this._isActive; } set { this._isActive = value; } }
        public string PictureLocation
        {
            get
            {
                return this._pictureLocation;
            }
            set
            {
                this._pictureLocation = value;
            }
        }

        //These three fields are based upon information on the transaction table
        //They should not be able to be changed after instantiation.
        public int Quantity { get { return this._quantity; } }
        public double InventoyCost { get { return this._inventoryCost; } }
        public double RevenueAmount { get { return this._revenueAmount; } }

		
		public InventoryItem()
		{
			this._itemID = 0;
			this._description = "";
			this._cost = 0;
			this._price = 0;
            this._groupID = 0;
            this._isActive = false;
            this._pictureLocation = "";
            this._quantity = 0;
            this._inventoryCost = 0;
            this._revenueAmount = 0;
		}
	
		public InventoryItem(int itemID, string description, double cost, 
                             double price,int groupID, bool isActive, string pictureLocation,
                             int quantity, double inventoryCost, double revenueAmount)
		{
			this._itemID = itemID;
			this._description = description;
			this._cost = cost;
			this._price = price;
            this._groupID = groupID;
            this._isActive = isActive;
            this._pictureLocation = pictureLocation;
            this._quantity = quantity;
            this._inventoryCost = inventoryCost;
            this._revenueAmount = revenueAmount;
		}
	}
}
